﻿using Romantics.Domain;
using Romantics.Domain.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Romantics.Models
{
    /// <summary>
    /// View model used to wrap data for sidebar widgets.
    /// </summary>
    public class WidgetViewModel
    {
        public WidgetViewModel(IDomainRepository _domainRepository, string action = "")
        {
            Categories = _domainRepository.Categories();
            Options = _domainRepository.Options();
            Regions = _domainRepository.Regions(0, Int32.MaxValue, "name", true);
            Years = _domainRepository.Years();
            Action = action;
        }

        public IList<Category> Categories
        { get; private set; }

        public IList<Region> Regions
        { get; private set; }

        public IList<int> Years
        { get; private set; }

        public string Action
        { get; private set; }

        public Options Options
        { get; private set; }
    }
}